package cn.itcast.gateway.clients;


import cn.itcast.gateway.pojo.User;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

@FeignClient("userservice") //标注要请求的服务名
public interface UserClient {

    //http://userservice/user/1  将请求路径进行拆解
    @GetMapping("/user/{id}")  //请求方式和请求路径
    User findById(@PathVariable("id") Long id);  //请求的参数

}
